import { Pipe, Injectable, PipeTransform } from '@angular/core';

@Pipe({
  name: 'rankfilter',
  pure: false,
})
@Injectable()
export class RankFilter implements PipeTransform {
  transform(items: any[], args: any): any {
    return items.filter((r, i) => i < args && r.value > 0);
  }
}
